package edu.unf.cen6940.web;

import org.junit.Test;

import org.junit.runner.RunWith;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.beans.factory.support.DefaultListableBeanFactory;

import org.springframework.context.ApplicationContext;

import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;

import org.springframework.test.context.ContextConfiguration;

import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.RequestScope;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.context.request.SessionScope;

/**
 * Unit test for the <code>ThesisstatusController</code> controller.
 *
 * @see edu.unf.cen6940.web.ThesisstatusController
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {
		"file:./resources/rms_test-security-context.xml",
		"file:./resources/rms_test-service-context.xml",
		"file:./resources/rms_test-dao-context.xml",
		"file:./resources/rms_test-web-context.xml" })
public class ThesisstatusControllerTest {
	/**
	 * The Spring application context.
	 *
	 */
	private ApplicationContext context;

	/**
	 * Test <code>editThesisstatusThesises()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GeteditThesisstatusThesises() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/editThesisstatusThesises");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ThesisstatusController controller = (ThesisstatusController) context.getBean("ThesisstatusController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>newThesisstatusThesises()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetnewThesisstatusThesises() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/newThesisstatusThesises");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ThesisstatusController controller = (ThesisstatusController) context.getBean("ThesisstatusController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>saveThesisstatusThesises()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetsaveThesisstatusThesises() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/saveThesisstatusThesises");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ThesisstatusController controller = (ThesisstatusController) context.getBean("ThesisstatusController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>confirmDeleteThesisstatusThesises()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetconfirmDeleteThesisstatusThesises() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/confirmDeleteThesisstatusThesises");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ThesisstatusController controller = (ThesisstatusController) context.getBean("ThesisstatusController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>deleteThesisstatusThesises()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetdeleteThesisstatusThesises() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/deleteThesisstatusThesises");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ThesisstatusController controller = (ThesisstatusController) context.getBean("ThesisstatusController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>selectThesisstatusThesises()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetselectThesisstatusThesises() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/selectThesisstatusThesises");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ThesisstatusController controller = (ThesisstatusController) context.getBean("ThesisstatusController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>listThesisstatusThesises()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetlistThesisstatusThesises() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/listThesisstatusThesises");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ThesisstatusController controller = (ThesisstatusController) context.getBean("ThesisstatusController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>indexThesisstatus()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetindexThesisstatus() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/indexThesisstatus");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ThesisstatusController controller = (ThesisstatusController) context.getBean("ThesisstatusController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>selectThesisstatus()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetselectThesisstatus() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/selectThesisstatus");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ThesisstatusController controller = (ThesisstatusController) context.getBean("ThesisstatusController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>editThesisstatus()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GeteditThesisstatus() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/editThesisstatus");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ThesisstatusController controller = (ThesisstatusController) context.getBean("ThesisstatusController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>saveThesisstatus()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetsaveThesisstatus() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/saveThesisstatus");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ThesisstatusController controller = (ThesisstatusController) context.getBean("ThesisstatusController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>newThesisstatus()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetnewThesisstatus() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/newThesisstatus");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ThesisstatusController controller = (ThesisstatusController) context.getBean("ThesisstatusController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>confirmDeleteThesisstatus()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetconfirmDeleteThesisstatus() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/confirmDeleteThesisstatus");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ThesisstatusController controller = (ThesisstatusController) context.getBean("ThesisstatusController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>deleteThesisstatus()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetdeleteThesisstatus() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/deleteThesisstatus");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ThesisstatusController controller = (ThesisstatusController) context.getBean("ThesisstatusController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>thesisstatusControllerbinaryaction()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetthesisstatusControllerbinaryaction() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/thesisstatusController/binary.action");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ThesisstatusController controller = (ThesisstatusController) context.getBean("ThesisstatusController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Autowired to set the Spring application context.
	 *
	 */
	@Autowired
	public void setContext(ApplicationContext context) {
		this.context = context;
		((DefaultListableBeanFactory) context.getAutowireCapableBeanFactory()).registerScope("session", new SessionScope());
		((DefaultListableBeanFactory) context.getAutowireCapableBeanFactory()).registerScope("request", new RequestScope());
	}

	/**
	 * Returns a mock HttpServletRequest object.
	 *
	 */
	private MockHttpServletRequest getMockHttpServletRequest() {
		MockHttpServletRequest request = new MockHttpServletRequest();
		ServletRequestAttributes attributes = new ServletRequestAttributes(request);
		RequestContextHolder.setRequestAttributes(attributes);
		return request;
	}

	/**
	 * Returns a mock HttpServletResponse object.
	 *
	 */
	private MockHttpServletResponse getMockHttpServletResponse() {
		return new MockHttpServletResponse();
	}
}